<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php echo $this->Html->charset(); ?>
	<title><?php echo $title_for_layout; ?></title>
	<?php
		echo $this->Html->meta('icon');
		echo $this->Html->css('css');
		echo $this->Html->script(array('jquery-1.6.4.min', 'ckeditor/ckeditor'));
	?>
</head>
<body style="min-width: 750px; max-width: 1000px; margin: 0 auto;">
	<?php echo $this->element('top_menu'); ?>
	<div id="content">
		<?php echo $session->flash(); ?>
		<div style="width: 20%; float: left; margin: 0 1%;">
			<div class="window projects-select" style="min-height: 400px;">
				<div class="title">Projects</div>
				<div class="content">
					<?php foreach ($projects as $i => $project) : ?>
						<?php $project = (isset($project['Project'])) ? $project['Project'] : $project; ?>
						<a href="/tasks/index/<?php echo $project['id']; ?>/<?php echo base64_encode('/'.$this->params['controller']); ?>">
							<div class="<?php echo ($i % 2 == 0) ? 'not-even' : 'even'; ?> project-option <?php if ($current_project['Project']['id'] == $project['id']) echo 'selected'; ?>">
								<?php echo $project['name']; ?>
							</div>
						</a>
					<?php endforeach; ?>
				</div>
			</div>
		</div>
		<div style="float: left; width: 77%; margin: 0 1% 0 0;">
			<?php echo $content_for_layout; ?>
		</div>

		<div class="clear" style="clear: both;"></div>
	</div>
	<?php //echo $this->element('sql_dump'); ?>
</body>
</html>